import {createStore} from 'redux'

//定义state初始化和修改规则
function counterReducer(state = 0,action){
   switch (action.type) {
       case "ADD":
           return state + 1
           break;
           case "MINUS":
            return state - 1
            break;
       default:
           return state
           break;
   }
}

const store = createStore(counterReducer)

export default store;